package io.rocketman.transport.client;

import io.rocketman.transport.NetworkTransportException;
import io.rocketman.transport.channel.Channel;
import io.rocketman.transport.channel.handler.ChannelHandler;

import java.net.InetSocketAddress;
import java.util.concurrent.Future;

/**
 * @author He Peng
 * @create 2018-05-25 1:53
 * @update 2018-05-25 1:53
 * @updatedesc : 更新说明
 * @see
 */
public interface Client {

    void open(InetSocketAddress remoteAddress) throws OpenNetworkClientException;

    Future connect() throws NetworkTransportException;

    Future ping(Object message) throws NetworkTransportException;

    Future request(Object message) throws NetworkTransportException;

    ChannelHandler getChannelHandler();

    Channel getChannel();
}
